/**
 * @author: Gene
 * @age: 永远18岁的美少年
 * @Email： yangjianyun@58.com
 * @date: 2021-11-11 21:35:48
 * @description: webpack默认配置文件
 */
const path = require("path")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const {CleanWebpackPlugin} = require("clean-webpack-plugin")

module.exports = {
    mode: "development",
    entry: "./src/index.js",
    output: {
        path: path.resolve(__dirname, "dist"),
        // 指定文件名, 默认是 main.js
        filename: "main.js"
    },
    devtool: false,
    module: { // loader配置
    },
    plugins: [
        new CleanWebpackPlugin({
            cleanOnceBeforeBuildPatterns: ["**/*"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/index.html"
        })
    ]
}
